package ObserverPattern;

/**
 * @Author: zhaojie
 * @Date: Created in 17:30 2018/6/25
 * @Description:
 */
public class OctalObserver extends Observer {
    public OctalObserver(Subject subject) {
    this.subject=subject;
    this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println( "Octal String: "
                + Integer.toOctalString( subject.getState() ) );
    }
}
